package cn.tedu.erp.project;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

//提供一个Spring Boot项目启动器(初始化项目内部的Servlet组件)
@SpringBootApplication
public class ErpProjectApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(ErpProjectApplication.class, args);
    }

    //重写父类的configure()方法，执行初始化项目的启动类是谁
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
//        return super.configure(builder);
        return builder.sources(ErpProjectApplication.class);
    }
}
